#include <iostream>

template <class T1, class T2>
auto Add(T1 x, T2 y) -> decltype(x + y)
{
    return x + y;
}

void DoTailingReturnTypeTest()
{
    using namespace std;
    int x = 5;
    double y = 8.8;
    cout << "the result of x(int) + y(double) = " << Add(x, y) << endl;
    cout << "the size of return type of Add()  = " << sizeof(Add(x, y)) << endl;
}

int main(int argc, char const *argv[])
{
    DoTailingReturnTypeTest();
    return 0;
}
